package com.aabte.design.pattern.behavioral.state;

public class Test {

    public static void main(String[] args) {

        CourseVideoContext courseVideoContext = new CourseVideoContext();

        // 默认是播放状态
        courseVideoContext.setCourseVideoState(CourseVideoContext.PLAY_STATE);
        System.out.println("当前状态：" + courseVideoContext.getCourseVideoState().getClass().getSimpleName());

        // 暂停状态
        courseVideoContext.pause();
        System.out.println("当前状态：" + courseVideoContext.getCourseVideoState().getClass().getSimpleName());

        // 快进状态
        courseVideoContext.speed();
        System.out.println("当前状态：" + courseVideoContext.getCourseVideoState().getClass().getSimpleName());

        // 停止状态
        courseVideoContext.stop();
        System.out.println("当前状态：" + courseVideoContext.getCourseVideoState().getClass().getSimpleName());

        courseVideoContext.speed();
        System.out.println("当前状态：" + courseVideoContext.getCourseVideoState().getClass().getSimpleName());

    }

}
